<?php
    namespace model\master;
    class companiesLogins
    {
        private static $dataAccess;
        private static function connect()
        {
            self::$dataAccess = new \framework\dataAccess(basename(__DIR__));
        }
        public static function checkLogin($login)
        {
            self::connect();
            $query = 'SELECT enabled FROM companieslogins WHERE login = \'' . self::$dataAccess -> escape($login) . '\' AND enabled';
            $result = self::$dataAccess -> query($query);
            return $result;
        }
    }